<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>" />
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>" />
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>" />
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>" />
<div class="t_bar">
	<span class="color_red">*</span>
	项目基本情况
</div>
<table class="t_css" width="100%" border="0" cellpadding="0" id="basic_tb2" cellspacing="1">
	<col style="width: 20%" />
	<col style="width: 25%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<tr class="li_1">
		<td align="right" >项目名称：</td>
		<td colspan="4">
			<input type='text' name='proposal/zh_title' id='zh_title' style="width: 87%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="项目名称">
		</td>
	</tr>
	<tr class="li_2">
		<td align="right">归口管理部门：</td>
		<td colspan="4">
			<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
			<cpt:tree key="recomend_org_gk" cacheable="false" readonly="true" className="hn_iuput_kuang gray" id="recomend_org" value="${recomend_org}" label="归口管理部门"   showPattern="all" shieldPattern="-1"
				 onClick="initTreeValueExt2" />
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required" value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">

		</td>
	</tr>
	<tr class="li_1">
		<td align="right">单位性质：</td>
		<td colspan="4">
			<cpt:checkbox key="character3" name="proposal/character3" repeatColumn="3" onClick="sureInput1();" tagType="radio"></cpt:checkbox>
			<input type="hidden" id="character3_value" name="proposal/character3_value" class="required" label="单位性质" value="<x:out select="$xmlData/data/proposal/character3_value" />">
			<input type="hidden" name="proposal/character3_name" value="<x:out select="$xmlData/data/proposal/character3_name" />">
		</td>
	</tr>
	<%-- <tr class="li_2">
		<td align="right">项目类型：</td>
		<td colspan="3">
			<cpt:checkbox key="pro_type1" name="proposal/pro_type1" repeatColumn="3" onClick="sureInput1();" tagType="radio"></cpt:checkbox>
			<input type="hidden" id="pro_type1_value" name="proposal/pro_type1_value" class="required" label="项目类型" value="<x:out select="$xmlData/data/proposal/pro_type1_value" />">
			<input type="hidden" name="proposal/pro_type1_name" value="<x:out select="$xmlData/data/proposal/pro_type1_name" />">
		</td>
	</tr> --%>
	<tr class="li_2">
		<td align="right">申报年度：</td>
		<td colspan="4">
			<cpt:checkbox key="prp_date" name="proposal/prp_date" repeatColumn="2" tagType="radio"></cpt:checkbox>
			<input type="hidden" id="prp_date_value" name="proposal/prp_date_value" class="required" label="申报年度" value="<x:out select="$xmlData/data/proposal/prp_date_value" />">
			<input type="hidden" name="proposal/prp_date_name" value="<x:out select="$xmlData/data/proposal/prp_date_name" />">
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">项目负责人姓名：</td>
		<td>
			<span name="zh_person/fzr_name"> 
			    	<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" />
		    	</span> 
		</td>
		<td align="right">职称/职务：</td>
		<td colspan="2">
			<span name="zh_person/prof_title_name"> 
			    	<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/prof_title_name"/>
		    	</span> /
		    <span name="zh_person/position"> 
			    	<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position"/>
		    	</span>
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">联系电话：</td>
		<td>
			<span name="zh_person/tel_work"> 
			    	<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />
		    	</span> 
		</td>
		<td align="right">手机：</td>
		<td colspan="2">
			<span name="zh_person/mobile"> 
			   <x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />
		    </span>
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">电子邮件：</td>
		<td>
			<span name="zh_person/email"> 
			    <x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" />
		    </span> 
		</td>
		<td align="right">传真：</td>
		<td colspan="2">
			<span name="zh_person/fax"> 
			   <x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/fax" />
		    </span>
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">科研(财务)部门联系人：</td>
		<td>
			<input   name="proposal/contact_psn_cname" label="科研(财务)部门联系人" type="text"  class="input_css required"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td align="right">职称：</td>
		<td colspan="2">
		    <c:set var="titlename">{'id':'<x:out select="$xmlData/data/proposal/prof_title_value" />','name':'<x:out select="$xmlData/data/proposal/prof_title_name" />'}</c:set>
			<cpt:tree key="prof_title" cacheable="false" readonly="true" value="${titlename}" id="prof_title" name="prof_title"  showPattern="all" shieldPattern="-1" onClick="initTreeValueExt2"   label="职称" />
			<input type="hidden" id="prof_title_value" name="proposal/prof_title_value" value="<x:out select="$xmlData/data/proposal/prof_title_value" />" class="required"  label="科研(财务)部门联系人-->职称"/> 
			<input type="hidden" id="prof_title_name" name="proposal/prof_title_name" value="<x:out select="$xmlData/data/proposal/prof_title_name" />" />
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">职务：</td>
		<td >
			<input  name="proposal/contact_psn_position" label="科研(财务)部门联系人-->职务" type="text"  class="input_css required"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_position" />"/> 
		</td>
		<td align="right">联系电话：</td>
		<td colspan="2">
          <input name="proposal/contact_psn_tel_work" label="科研(财务)部门联系人-->联系电话" type="text"  class="input_css required"  maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_tel_work" />"/> 
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">手机：</td>
		<td >
			<input name="proposal/contact_psn_mobile" label="科研(财务)部门联系人-->手机号码" type="text" onfocus="InitInput.setNumber(this,11,0,0)" maxlength="11"  class="input_css required mobile"  value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td align="right">电子邮箱：</td>
		<td colspan="2">
			<input   name="proposal/contact_psn_email" label="科研(财务)部门联系人-->电子邮箱" type="text" maxlength="20"  class="input_css required email"   value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">QQ：</td>
		<td colspan="1">
			<input name="proposal/contact_psn_qq" label="科研(财务)部门联系人-->QQ" type="text"  maxlength="20"  class="input_css required "    value="<x:out select="$xmlData/data/proposal/contact_psn_qq" />"/> 
		</td>
		<td align="right">申报日期：</td>
		<td colspan="2">
			<%-- ${sercverSysDate1} --%>
			<c:set var="submit_date">
				<x:out select="$xmlData/data/proposal/submit_date" />
			</c:set>
			<c:if test="${empty submit_date }">
				<c:set var="submit_date">${sercverSysDate1}</c:set>
			</c:if>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date " label="申报日期"></cpt:date>
		</td>
	</tr>
	<tr class="li_2">
		<td align="right">起始日期：</td>
		<td colspan="1">
			<c:set var="start_date">
				<x:out select="$xmlData/data/proposal/start_date" />
			</c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date   dateCompare:end_date " label="起始日期"></cpt:date>
		</td>
		<td align="right">完成日期：</td>
		<td colspan="2">
			<c:set var="end_date">
				<x:out select="$xmlData/data/proposal/end_date" />
			</c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date " label="完成日期"></cpt:date>
		</td>
	</tr>
	<tr class="li_1">
		<td align="right" >
			项目报审级次：
			<br />
			（省补助资金拨付所属财政局）
		</td>
		<td>
			<c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang  gray" readonly="true" value="${sub_step}" label="项目报审级次" id="sub_step" onlyChooseLeaf="false" showPattern="all"
				shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt2" />
			<input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required" label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />" />
			<input id="sub_step_name" type="hidden" name="proposal/sub_step_name" value="<x:out select="$xmlData/data/proposal/sub_step_name" />" />
		</td>
		<td align="right">总经费（人民币/万元）：</td>
		<td colspan="2">
			<input type='text' name='proposal/total_budget' class="required valueGreatEqual:total_budget:count_num" id='total_budget' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
				value='<x:out select="$xmlData/data/proposal/total_budget"/>' label="总经费">
		
		</td>
		
	</tr>
	<tr class="li_1">
		<td align="right">项目申请金额（万元）：</td>
		<td>
			<input type='text' name='proposal/request_amount' class="required" id='request_amount' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
			onchange="add();"	value='<x:out select="$xmlData/data/proposal/request_amount"/>' label="项目申请金额">
		
		</td>
		<td align="right">单位自筹金额（万元）：</td>
		<td colspan="2">
			<input type='text' name='proposal/raise_amount' class="required" id='raise_amount' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
			onchange="add();"	value='<x:out select="$xmlData/data/proposal/raise_amount"/>' label="单位自筹金额">
			<input type="hidden" name="proposal/count_num" id="count_num" value='<x:out select="$xmlData/data/proposal/count_num"/>' label="项目申请金额+单位自筹金额"/>
		</td>
		
	</tr>
	<tr class="li_1">
		<td align="right">现有仪器设备（台/套）：</td>
		<td>
			<input type='text' name='proposal/appliances_num' class="required" id='appliances_num' onfocus="InitInput.setNumber(this,7,0,0)" style="text-align: right;"
				value='<x:out select="$xmlData/data/proposal/appliances_num"/>' label="现有仪器设备">
			
		</td>
		<td align="right">仪器设备总值（万元）：</td>
		<td colspan="2">
			<input type='text' name='proposal/appliances_amount' class="required" id='appliances_amount' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
				value='<x:out select="$xmlData/data/proposal/appliances_amount"/>' label="仪器设备总值">
		
		</td>
		
	</tr>
	<tr class="li_1">
		<td align="right">仪器设备名称：</td>
		<td colspan="4">
			<input type='text' name='proposal/appliances_name'  style="width: 87%" class="input_css required" maxlength="200" value='<x:out select="$xmlData/data/proposal/appliances_name"/>' label="仪器设备名称">
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">英文名称：</td>
		<td colspan="4">
			<input type='text' name='proposal/appliances_en_name'  style="width: 87%" class="input_css required" maxlength="200" value='<x:out select="$xmlData/data/proposal/appliances_en_name"/>' label="英文名称">
		</td>
	</tr>
	<tr class="li_2">
		<td align="right">购置类型：</td>
		<td colspan="4">
			<cpt:checkbox key="buy_type" name="proposal/buy_type" repeatColumn="2" tagType="radio"></cpt:checkbox>
			<input type="hidden" id="buy_type_value" name="proposal/buy_type_value" class="required" label="购置类型" value="<x:out select="$xmlData/data/proposal/buy_type_value" />">
			<input type="hidden" name="proposal/buy_type_name" value="<x:out select="$xmlData/data/proposal/buy_type_name" />">
		</td>
	</tr>
	<tr class="li_2">
		<td align="right">购置仪器分类：</td>
		<td colspan="4">
			<c:set var="instrument_classification"><x:out select="$xmlData/data/proposal/instrument_classification" /></c:set>
				<cpt:checkbox key="instrument_classification" name="proposal/instrument_classification"  value="${instrument_classification}" width="70px;" repeatColumn="3"  style="border: 0px; padding: 0px; margin: 0px;float:left;"  ></cpt:checkbox>
				<input type="hidden" id="instrument_classification_value" name="proposal/instrument_classification_value"  class="required"  value="<x:out select="$xmlData/data/proposal/instrument_classification_value" />" label="购置仪器分类">
				<input type="hidden" name="proposal/instrument_classification_name" value="<x:out select="$xmlData/data/proposal/instrument_classification_name" />">
		</td>
	</tr>
	<tr class="li_1">
	    	<td align="right">用途（限500字）：</td>
	    	<td colspan="4">
	    		<textarea name="proposal/purposes" style="width:98%" class="input_textarea required maxlength:500"  label="用途"   rows=5 cols=60><x:out select="$xmlData/data/proposal/purposes" /></textarea>
				<input type="hidden" name="proposal/purposes_hidden" id="project/purposes_hidden" value="<x:out select="$xmlData/data/proposal/purposes_hidden" />"/>
	    	</td>
	    	 
	    </tr>
	 <tr class="li_1">
    	<td align="right" rowspan="6">可供货厂商<br/>（按选型意向排序）：</td>
    	<td align="right">1.生产公司名称：</td>
    	<td colspan="3">
 			<input type='text' name='proposal/company_name1'  style="width: 96%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/company_name1"/>' label="可供货厂商-->1.生产公司名称">
    	</td>
	</tr>
	<tr class="li_1">
    	<td align="right">型号：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/model_name1'  style="width: 87%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/model_name1"/>' label="可供货厂商-->1.生产公司名称-->型号">
    	</td>
    	<td align="right">报价（人民币/万元）：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/offer1'  style="text-align:right;width: 87%" class="input_css required"  onfocus="InitInput.setNumber(this,9,2,2)" value='<x:out select="$xmlData/data/proposal/offer1"/>' label="可供货厂商-->1.生产公司名称-->报价">
    	</td>
	</tr>
	<tr class="li_1">
    	<td align="right">2.生产公司名称：</td>
    	<td colspan="3">
 			<input type='text' name='proposal/company_name2'  style="width: 96%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/company_name2"/>' label="可供货厂商-->2.生产公司名称">
    	</td>
	</tr>
	<tr class="li_1">
    	<td align="right">型号：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/model_name2'  style="width: 87%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/model_name2"/>' label="可供货厂商-->2.生产公司名称-->型号">
    	</td>
    	<td align="right">报价（人民币/万元）：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/offer2'  style="text-align:right;width: 87%" class="input_css required"  onfocus="InitInput.setNumber(this,9,2,2)" value='<x:out select="$xmlData/data/proposal/offer2"/>' label="可供货厂商-->2.生产公司名称-->报价">
    	</td>
	</tr>
	<tr class="li_1">
    	<td align="right">3.生产公司名称：</td>
    	<td colspan="3">
 			<input type='text' name='proposal/company_name3'  style="width: 96%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/company_name3"/>' label="可供货厂商-->3.生产公司名称">
    	</td>
	</tr>
	<tr class="li_1">
    	<td align="right">型号：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/model_name3'  style="width: 87%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/model_name3"/>' label="可供货厂商-->3.生产公司名称-->型号">
    	</td>
    	<td align="right">报价（人民币/万元）：</td>
    	<td colspan="1">
 			<input type='text' name='proposal/offer3'  style="text-align:right;width: 87%" class="input_css required"  onfocus="InitInput.setNumber(this,9,2,2)" value='<x:out select="$xmlData/data/proposal/offer3"/>' label="可供货厂商-->3.生产公司名称-->报价">
    	</td>
	</tr>
	<%-- <tr class="li_1">
		<td align="right">规格型号：</td>
		<td colspan="3">
			<input type='text' name='proposal/standard' id='standard' class="inpu required" maxlength="80" value='<x:out select="$xmlData/data/proposal/standard"/>' label="规格型号">
		</td>
	</tr>	 --%>
	  <tr class="li_2">
	    	<td align="right">项目简介（限300字）：</td>
	    	<td colspan="4">
	    		<textarea name="proposal/project_description" style="width:98%" class="input_textarea required maxlength:300"  label="项目简介"   rows=10 cols=60><x:out select="$xmlData/data/proposal/project_description" /></textarea>
				<input type="hidden" name="proposal/project_description_hidden" id="project/project_description_hidden" value="<x:out select="$xmlData/data/proposal/project_description_hidden" />"/>
	    	</td>
	    </tr>
</table>
<script type="text/javascript">
$(function(){
	add();
});
function add(){
	var request_amount=$("#request_amount").val();
	var raise_amount=$("#raise_amount").val();
	var count = ((parseFloat(request_amount)*10000 + parseFloat(raise_amount)*10000)/10000).toFixed(4);
	count = formatNumber(count.toString(), 9, 2, 2);// 格式化金额
	$("#count_num").val(count);
}
	function initTreeValueExt(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			}
			
			return false;
			}
		
		
			var str = treeNode.name;
			var obj = treeNode.parentNode;
			while (obj != null) {
				obj = obj.parentNode;
			}
			
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
	}
	function initTreeValueExt2(treeId, treeNode) {
		   
		  if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			}
			
			return false;
			}
		
		
			var str = treeNode.name;
			var obj = treeNode.parentNode;
			while (obj != null) {
				obj = obj.parentNode;
			}
			
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
			
		}
		
</script>
